import request from '@/router/axios';

//我的任务列表
export const getMyTaskList = (params) => {
  return request({
    url: '/api/hg-public/tasktrack/getMyTask',
    method: 'get',
    params: {
      ...params,
    }
  })
}

//更新 
export const updateTask = (row) => {
  return request({
    url: '/api/hg-public/tasktrack/submit',
    method: 'post',
    data: row
  })
}

//删除 
export const removeTask = (ids) => {
  return request({
    url: '/api/hg-public/tasktrack/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
//获取部门
export const getDept = () => {
  return request({
    url: '/api/hg-public/personinfo/deptlist',
    method: 'get',
    params: {
    }
  })
}

//删除 
export const submitTask = (id, status) => {
  return request({
    url: '/api/hg-public/tasktrack/updateDesignDetail',
    method: 'post',
    data: {
      id,
      status
    }
  })
}

//跟踪记录列表
export const getTrackList = (params) => {
  return request({
    url: '/api/hg-public/tasktrack/list',
    method: 'get',
    params: {
      ...params,
    }
  })
}
//获取记录
export const getTrackDetail = (id) => {
  return request({
    url: '/api/hg-public/tasktrack/detail',
    method: 'get',
    params: {
      id
    }
  })
}
//更新记录 
export const updateTrack = (row) => {
  return request({
    url: '/api/hg-public/tasktrack/update',
    method: 'post',
    data: row
  })
}